<include file="header" />
<div class="wraper" js="wapjs/meeting/js/steptwo">
	<div class="head clearfix">
		<a href="javascript:void(0);" data-href="{BEESCRM::U('/Meeting/MeetingInvite/addInviteMeeting',array('step' => 'one','account_id' => $accountId))}" class="prev-step iconfont icon-zuo"></a>
		<span class="head-name">参会人员</span>
		<input type="hidden" id="js_account_id" value="{BEESCRM:$accountId}">
	</div>

	<include file="new/statusbox" />

	<div class="lists">
		<a href="javascript:void(0);" data-href="{BEESCRM::U('/Meeting/InviteUser/choiceDepartment',array('account_id' => $accountId))}" class="list-line text-green inviter">
			<span class="iconfont icon-tianjia"></span> 添加参会人员
			<p class="text-12 pull-right" style="padding-top: 4px;">已选<php>echo count($userData);</php>人</p>
		</a>
		<div class="user-box">
			<volist name="userData" id="vo">
				<div class="list-line tb-mode participant">
					<div class="tb-cell small-photo"><img src="{BEESCRM:$vo.avatar}"/></div>
					<div class="tb-cell">{BEESCRM:$vo.real_name}
						<if condition="$vo.conflict eq 1">
							<span class="conflict text-12">冲突{BEESCRM:$vo['conflictInfo']['start_time']|date='H:i:s',###}-{BEESCRM:$vo['conflictInfo']['end_time']|date='H:i:s',###}</span>
						</if>
					</div>
					<div class="tb-cell delete text-right"><span class="iconfont icon-shanchu" v='{BEESCRM:$vo.user_id}'></span></div>
				</div>
			</volist>
		</div>
		<a href="javascript:;" class="list-line text-green text-center view-more">展开</a>
	</div>

	<p class="blobk-title text-12">填写会议内容</p>
	<textarea class="textarea topblock" placeholder="点击这里编辑会议内容" id="content">{BEESCRM:$content}</textarea>

	<div class="btn-box clearfix">
		<a href="javascript:void(0);" data-href="{BEESCRM::U('/Meeting/MeetingInvite/addInviteMeeting',array('step' => 'one','account_id' => $accountId))}" class="prev-step btn half-btn bg-green">返回预约会议室</a>
		<a href="javascript:void(0)" url="/Meeting/MeetingInvite/addInviteMeeting/step/three/account_id/{BEESCRM:$accountId}" class="btn next-step half-btn bg-green">完善会议议程</a>
	</div>
</div>


<div class="layer-wraper conflictPop">
	<div class="main">
		<p class="title">人员冲突</p>
		<label placeholder="审核不通过原因~" id="reason" name="reason" readonly>
			您邀请参会人员有会议冲突，是否确认要继续？
		</label>
		<div class="clearfix upload-img">
		</div>
		<div class="pop-btn">
			<a href="#" class="btn cancel">取消</a>
			<a href="#" class="btn green-btn sure" id="">确认</a>
		</div>
	</div>
</div>

<input type="hidden" name="accountId" id="accountId" value="{BEESCRM:$accountId}" />
<script type="text/javascript" src="/assets/public/seajs/sea.js"></script>
<script enter="publicjs/public" id="confnode" async="async" src="/assets/public/config.js"></script>
<script type="text/javascript" src="/assets/public/jquery-2.1.0.min.js"></script>
<script>
	$('.next-step').click(function(){ //下一步
		var jump = $(this).attr('url');
		var data = {};
		var accountId = $('#js_account_id').val();
		data.content = $("#content").val();
		$.ajax({
			url:"/Meeting/MeetingInvite/saveContent/account_id/" + accountId,
			data:data,
			type:'post',
			success:function(result){
				location.href = jump;
			}
		});
	});

	$('.prev-step').click(function(){ //上一步
		var data = {};
		var jump = $(this).attr('data-href');
		var accountId = $('#js_account_id').val();
		data.content = $("#content").val();
		$.ajax({
			url:"/Meeting/MeetingInvite/saveContent/account_id/" + accountId,
			data:data,
			type:'post',
			success:function(result){
				location.href = jump;
			}
		});
	});
</script>

<include file="footer" />
